package com.cizzy.video.feign;

import com.cizzy.video.common.Result;
import com.cizzy.video.entity.dao.UserCountDAO;
import com.cizzy.video.entity.dao.UserDAO;
import com.cizzy.video.entity.dto.UserDTO;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author 51755
 */
@Component
public class UserFeignFallback implements UserFeign {
    @Override
    public Result<UserDAO> getUserById(Long id) {
        return Result.error("服务不可用");
    }

    @Override
    public Result<UserCountDAO> getUserCountById(Long id) {
        return Result.error("服务不可用");
    }

    @Override
    public Result<List<UserDTO>> getUserListByIds(List<Long> ids) {
        return Result.error("服务不可用");
    }

    @Override
    public Result<List<UserCountDAO>> getUserCountListByIds(@RequestBody List<Long> ids) {
        return Result.error("服务不可用");
    }

    @Override
    public Result<List<Long>> getRandomUserIdList(@PathVariable("num") Integer num) {
        return Result.error("服务不可用");
    }

    @Override
    public void testFeign() { return; };
}
